Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for bellatrix block in maybeIssueNextProposerEngineFcU #4057

Merged
merged 1 commit into from
May 25, 2022

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented May 25, 2022

Motivation
Only do prepareSlot proposer computation/checks post bellatrix to avoid side effects for mainnet till this is better optimized.

Checks the prepareSlot against bellatrix epoch in config.

@g11tech g11tech requested a review from a team as a code owner May 25, 2022 08:56
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 4624671 Previous: 11f6d0e Ratio
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4225 ms/op 7.2759 ms/op 0.33
Full benchmark results
Benchmark suite Current: 4624671 Previous: 11f6d0e Ratio
BeaconState.hashTreeRoot - No change 577.00 ns/op 551.00 ns/op 1.05
BeaconState.hashTreeRoot - 1 full validator 73.668 us/op 70.882 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 752.83 us/op 679.15 us/op 1.11
BeaconState.hashTreeRoot - 512 full validator 7.9850 ms/op 7.1044 ms/op 1.12
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 103.51 us/op 88.681 us/op 1.17
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3842 ms/op 1.3153 ms/op 1.05
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 17.974 ms/op 17.934 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 74.971 us/op 69.741 us/op 1.07
BeaconState.hashTreeRoot - 32 balances 655.07 us/op 588.21 us/op 1.11
BeaconState.hashTreeRoot - 512 balances 6.0946 ms/op 5.7929 ms/op 1.05
BeaconState.hashTreeRoot - 250000 balances 125.36 ms/op 125.41 ms/op 1.00
processSlot - 1 slots 15.106 us/op 16.294 us/op 0.93
processSlot - 32 slots 2.2466 ms/op 2.1975 ms/op 1.02
getCommitteeAssignments - req 1 vs - 250000 vc 5.4236 ms/op 5.4447 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 7.8369 ms/op 7.9457 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 9.0232 ms/op 8.5496 ms/op 1.06
computeProposers - vc 250000 21.035 ms/op 22.287 ms/op 0.94
computeEpochShuffling - vc 250000 180.86 ms/op 165.54 ms/op 1.09
getNextSyncCommittee - vc 250000 341.58 ms/op 358.95 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei normalcase 5.4377 ms/op 5.2907 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei worstcase 7.3838 ms/op 6.9655 ms/op 1.06
altair processAttestation - setStatus - 1/6 committees join 242.47 us/op 219.82 us/op 1.10
altair processAttestation - setStatus - 1/3 committees join 450.99 us/op 462.35 us/op 0.98
altair processAttestation - setStatus - 1/2 committees join 636.59 us/op 597.82 us/op 1.06
altair processAttestation - setStatus - 2/3 committees join 795.92 us/op 776.18 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 1.1305 ms/op 1.1928 ms/op 0.95
altair processAttestation - setStatus - 100% committees join 1.4104 ms/op 1.3900 ms/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase 31.325 ms/op 30.908 ms/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase hashState 45.245 ms/op 43.279 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 90.149 ms/op 90.151 ms/op 1.00
altair processBlock - 250000 vs - 7PWei worstcase hashState 133.52 ms/op 136.89 ms/op 0.98
altair processEth1Data - 250000 vs - 7PWei normalcase 1.0234 ms/op 1.0997 ms/op 0.93
altair processEpoch - mainnet_e81889 653.76 ms/op 613.67 ms/op 1.07
mainnet_e81889 - altair beforeProcessEpoch 153.05 ms/op 117.46 ms/op 1.30
mainnet_e81889 - altair processJustificationAndFinalization 72.982 us/op 72.362 us/op 1.01
mainnet_e81889 - altair processInactivityUpdates 12.582 ms/op 11.366 ms/op 1.11
mainnet_e81889 - altair processRewardsAndPenalties 97.727 ms/op 170.62 ms/op 0.57
mainnet_e81889 - altair processRegistryUpdates 15.267 us/op 17.377 us/op 0.88
mainnet_e81889 - altair processSlashings 4.4700 us/op 6.7660 us/op 0.66
mainnet_e81889 - altair processEth1DataReset 4.4370 us/op 6.4930 us/op 0.68
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.5074 ms/op 7.5130 ms/op 0.33
mainnet_e81889 - altair processSlashingsReset 20.323 us/op 22.744 us/op 0.89
mainnet_e81889 - altair processRandaoMixesReset 25.716 us/op 25.970 us/op 0.99
mainnet_e81889 - altair processHistoricalRootsUpdate 4.8440 us/op 9.2400 us/op 0.52
mainnet_e81889 - altair processParticipationFlagUpdates 13.190 us/op 14.875 us/op 0.89
mainnet_e81889 - altair processSyncCommitteeUpdates 4.1640 us/op 5.5820 us/op 0.75
mainnet_e81889 - altair afterProcessEpoch 217.24 ms/op 192.92 ms/op 1.13
altair processInactivityUpdates - 250000 normalcase 46.532 ms/op 45.577 ms/op 1.02
altair processInactivityUpdates - 250000 worstcase 40.895 ms/op 37.248 ms/op 1.10
altair processRewardsAndPenalties - 250000 normalcase 96.658 ms/op 91.975 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 148.39 ms/op 140.37 ms/op 1.06
altair processSyncCommitteeUpdates - 250000 352.69 ms/op 356.37 ms/op 0.99
Tree 40 250000 create 899.18 ms/op 919.42 ms/op 0.98
Tree 40 250000 get(125000) 346.87 ns/op 335.51 ns/op 1.03
Tree 40 250000 set(125000) 3.1868 us/op 2.9838 us/op 1.07
Tree 40 250000 toArray() 37.137 ms/op 35.956 ms/op 1.03
Tree 40 250000 iterate all - toArray() + loop 36.728 ms/op 36.298 ms/op 1.01
Tree 40 250000 iterate all - get(i) 137.26 ms/op 133.98 ms/op 1.02
MutableVector 250000 create 16.847 ms/op 17.334 ms/op 0.97
MutableVector 250000 get(125000) 14.744 ns/op 14.001 ns/op 1.05
MutableVector 250000 set(125000) 792.81 ns/op 1.0010 us/op 0.79
MutableVector 250000 toArray() 6.6239 ms/op 7.1902 ms/op 0.92
MutableVector 250000 iterate all - toArray() + loop 7.2217 ms/op 7.9341 ms/op 0.91
MutableVector 250000 iterate all - get(i) 3.6719 ms/op 3.5945 ms/op 1.02
Array 250000 create 6.7134 ms/op 7.5130 ms/op 0.89
Array 250000 clone - spread 3.9053 ms/op 3.9445 ms/op 0.99
Array 250000 get(125000) 1.7200 ns/op 1.8430 ns/op 0.93
Array 250000 set(125000) 1.6950 ns/op 1.7380 ns/op 0.98
Array 250000 iterate all - loop 147.94 us/op 150.17 us/op 0.99
effectiveBalanceIncrements clone Uint8Array 300000 185.88 us/op 124.71 us/op 1.49
effectiveBalanceIncrements clone MutableVector 300000 809.00 ns/op 1.3570 us/op 0.60
effectiveBalanceIncrements rw all Uint8Array 300000 303.61 us/op 208.91 us/op 1.45
effectiveBalanceIncrements rw all MutableVector 300000 217.21 ms/op 304.68 ms/op 0.71
aggregationBits - 2048 els - zipIndexesInBitList 28.422 us/op 43.416 us/op 0.65
regular array get 100000 times 58.622 us/op 59.810 us/op 0.98
wrappedArray get 100000 times 58.242 us/op 60.217 us/op 0.97
arrayWithProxy get 100000 times 42.068 ms/op 36.982 ms/op 1.14
ssz.Root.equals 586.00 ns/op 604.00 ns/op 0.97
byteArrayEquals 592.00 ns/op 585.00 ns/op 1.01
phase0 processBlock - 250000 vs - 7PWei normalcase 4.5386 ms/op 4.9823 ms/op 0.91
phase0 processBlock - 250000 vs - 7PWei worstcase 56.213 ms/op 59.214 ms/op 0.95
phase0 afterProcessEpoch - 250000 vs - 7PWei 209.13 ms/op 209.19 ms/op 1.00
phase0 beforeProcessEpoch - 250000 vs - 7PWei 77.256 ms/op 81.332 ms/op 0.95
phase0 processEpoch - mainnet_e58758 597.10 ms/op 627.72 ms/op 0.95
mainnet_e58758 - phase0 beforeProcessEpoch 269.06 ms/op 286.07 ms/op 0.94
mainnet_e58758 - phase0 processJustificationAndFinalization 67.048 us/op 67.534 us/op 0.99
mainnet_e58758 - phase0 processRewardsAndPenalties 156.00 ms/op 93.939 ms/op 1.66
mainnet_e58758 - phase0 processRegistryUpdates 33.437 us/op 32.940 us/op 1.02
mainnet_e58758 - phase0 processSlashings 4.2610 us/op 5.7620 us/op 0.74
mainnet_e58758 - phase0 processEth1DataReset 4.0930 us/op 5.1400 us/op 0.80
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 3.0317 ms/op 6.2512 ms/op 0.48
mainnet_e58758 - phase0 processSlashingsReset 21.097 us/op 20.496 us/op 1.03
mainnet_e58758 - phase0 processRandaoMixesReset 25.720 us/op 24.380 us/op 1.05
mainnet_e58758 - phase0 processHistoricalRootsUpdate 4.7310 us/op 7.0200 us/op 0.67
mainnet_e58758 - phase0 processParticipationRecordUpdates 24.224 us/op 23.664 us/op 1.02
mainnet_e58758 - phase0 afterProcessEpoch 176.52 ms/op 164.75 ms/op 1.07
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4225 ms/op 7.2759 ms/op 0.33
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.7225 ms/op 7.8117 ms/op 0.35
phase0 processRegistryUpdates - 250000 normalcase 27.294 us/op 28.769 us/op 0.95
phase0 processRegistryUpdates - 250000 badcase_full_deposits 506.88 us/op 499.07 us/op 1.02
phase0 processRegistryUpdates - 250000 worstcase 0.5 248.90 ms/op 232.39 ms/op 1.07
phase0 getAttestationDeltas - 250000 normalcase 17.271 ms/op 17.128 ms/op 1.01
phase0 getAttestationDeltas - 250000 worstcase 13.601 ms/op 18.112 ms/op 0.75
phase0 processSlashings - 250000 worstcase 7.0023 ms/op 7.2653 ms/op 0.96
shuffle list - 16384 els 12.345 ms/op 10.966 ms/op 1.13
shuffle list - 250000 els 176.60 ms/op 156.77 ms/op 1.13
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 434.06 us/op 530.64 us/op 0.82
pass gossip attestations to forkchoice per slot 4.0469 ms/op 3.9081 ms/op 1.04
computeDeltas 4.3977 ms/op 3.9256 ms/op 1.12
computeProposerBoostScoreFromBalances 929.40 us/op 503.60 us/op 1.85
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.8162 ms/op 2.6397 ms/op 1.07
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 90.223 us/op 88.862 us/op 1.02
BLS verify - blst-native 2.2594 ms/op 2.2365 ms/op 1.01
BLS verifyMultipleSignatures 3 - blst-native 4.7002 ms/op 4.5702 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst-native 9.8937 ms/op 10.147 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst-native 36.861 ms/op 35.925 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 48.930 us/op 48.601 us/op 1.01
BLS aggregatePubkeys 128 - blst-native 194.96 us/op 190.30 us/op 1.02
getAttestationsForBlock 65.578 ms/op 74.752 ms/op 0.88
isKnown best case - 1 super set check 527.00 ns/op 527.00 ns/op 1.00
isKnown normal case - 2 super set checks 501.00 ns/op 478.00 ns/op 1.05
isKnown worse case - 16 super set checks 529.00 ns/op 495.00 ns/op 1.07
CheckpointStateCache - add get delete 14.103 us/op 15.289 us/op 0.92
validate gossip signedAggregateAndProof - struct 5.1394 ms/op 5.3919 ms/op 0.95
validate gossip attestation - struct 2.4475 ms/op 2.4086 ms/op 1.02
altair verifyImport mainnet_s3766816:31 7.5397 s/op 8.5380 s/op 0.88
pickEth1Vote - no votes 2.4642 ms/op 2.5001 ms/op 0.99
pickEth1Vote - max votes 30.523 ms/op 32.613 ms/op 0.94
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.255 ms/op 14.755 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.985 ms/op 26.923 ms/op 1.08
pickEth1Vote - Eth1Data fastSerialize value x2048 1.8838 ms/op 2.0619 ms/op 0.91
pickEth1Vote - Eth1Data fastSerialize tree x2048 21.383 ms/op 22.268 ms/op 0.96
bytes32 toHexString 1.2430 us/op 1.4770 us/op 0.84
bytes32 Buffer.toString(hex) 838.00 ns/op 817.00 ns/op 1.03
bytes32 Buffer.toString(hex) from Uint8Array 1.1340 us/op 1.1640 us/op 0.97
bytes32 Buffer.toString(hex) + 0x 864.00 ns/op 888.00 ns/op 0.97
Object access 1 prop 0.44300 ns/op 0.48500 ns/op 0.91
Map access 1 prop 0.37700 ns/op 0.35700 ns/op 1.06
Object get x1000 17.470 ns/op 16.664 ns/op 1.05
Map get x1000 0.99700 ns/op 0.95100 ns/op 1.05
Object set x1000 116.43 ns/op 126.25 ns/op 0.92
Map set x1000 82.256 ns/op 86.675 ns/op 0.95
Return object 10000 times 0.43330 ns/op 0.39950 ns/op 1.08
Throw Error 10000 times 7.3955 us/op 6.8844 us/op 1.07
enrSubnets - fastDeserialize 64 bits 3.3660 us/op 3.4630 us/op 0.97
enrSubnets - ssz BitVector 64 bits 1.0010 us/op 952.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 474.00 ns/op 507.00 ns/op 0.93
enrSubnets - ssz BitVector 4 bits 958.00 ns/op 922.00 ns/op 1.04
prioritizePeers score -10:0 att 32-0.1 sync 2-0 119.91 us/op 124.95 us/op 0.96
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 164.85 us/op 157.78 us/op 1.04
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 290.24 us/op 290.98 us/op 1.00
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 653.21 us/op 668.93 us/op 0.98
prioritizePeers score 0:0 att 64-1 sync 4-1 611.75 us/op 554.05 us/op 1.10
RateTracker 1000000 limit, 1 obj count per request 208.03 ns/op 211.11 ns/op 0.99
RateTracker 1000000 limit, 2 obj count per request 151.33 ns/op 162.35 ns/op 0.93
RateTracker 1000000 limit, 4 obj count per request 136.74 ns/op 132.11 ns/op 1.04
RateTracker 1000000 limit, 8 obj count per request 121.76 ns/op 129.77 ns/op 0.94
RateTracker with prune 5.3990 us/op 6.0040 us/op 0.90
array of 16000 items push then shift 5.5524 us/op 5.6422 us/op 0.98
LinkedList of 16000 items push then shift 31.170 ns/op 30.558 ns/op 1.02
array of 16000 items push then pop 274.03 ns/op 268.12 ns/op 1.02
LinkedList of 16000 items push then pop 25.361 ns/op 25.546 ns/op 0.99
array of 24000 items push then shift 8.2781 us/op 8.2176 us/op 1.01
LinkedList of 24000 items push then shift 31.643 ns/op 30.997 ns/op 1.02
array of 24000 items push then pop 246.00 ns/op 261.07 ns/op 0.94
LinkedList of 24000 items push then pop 25.835 ns/op 26.667 ns/op 0.97
intersect bitArray bitLen 8 13.259 ns/op 9.9510 ns/op 1.33
intersect array and set length 8 211.43 ns/op 229.50 ns/op 0.92
intersect bitArray bitLen 128 76.512 ns/op 60.421 ns/op 1.27
intersect array and set length 128 2.6390 us/op 2.5066 us/op 1.05

by benchmarkbot/action

@g11tech g11tech merged commit 76f0d0d into master May 25, 2022
@g11tech g11tech deleted the g11tech/bellatrix-check-issuenextproposer branch May 25, 2022 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants